#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

int My_strlen(char* s)
{
	char* start = s;
	while (*s != '\0')
	{
		s++;
	}
	return  s - start;
}
int main()
{
	int i = 0;
	char arr[1000];
	gets(arr);
	int len = My_strlen(arr);
	char* p = arr + len - 1;
	for (i = 0; i < len; i++)
	{
		putchar(*(p - i));
	}
	return 0;
}